<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello mdui</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<script type="text/javascript" src="../../statics/common/js/header.js"></script>
		<!--标准mdui.css-->
		<link rel="stylesheet" href="../../statics/mdui/css/mdui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="../../statics/mdui/css/app.css"/>
	</head>
	<body>
		<header class="mdui-bar mdui-bar-nav">
			<a class="mdui-action-back mdui-icon mdui-icon-left-nav mdui-pull-left"></a>
			<h1 class="mdui-title">checkbox（复选框）</h1>
		</header>
		<div class="mdui-content">
			<h5 class="mdui-content-padded">图标左对齐</h5>
			<div class="mdui-card">
				<form class="mdui-input-group">
					<div class="mdui-input-row mdui-checkbox mdui-left">
						<label>checked：false</label>
						<input name="checkbox" value="Item 1" type="checkbox" >
					</div>
					<div class="mdui-input-row mdui-checkbox mdui-left">
						<label>checked：true</label>
						<input name="checkbox" value="Item 2" type="checkbox" checked>
					</div>
					<div class="mdui-input-row mdui-checkbox mdui-left mdui-disabled">
						<label>disabled checkbox</label>
						<input name="checkbox" type="checkbox" disabled="disabled">
					</div>
				</form>
			</div>
			<h5 class="mdui-content-padded">图标右对齐</h5>
			<div class="mdui-card">
				<form class="mdui-input-group">
					<div class="mdui-input-row mdui-checkbox">
						<label>checked：false</label>
						<input name="checkbox1" value="Item 3" type="checkbox" >
					</div>
					<div class="mdui-input-row mdui-checkbox">
						<label>checked：true</label>
						<input name="checkbox1" value="Item 4" type="checkbox" checked>
					</div>
					<div class="mdui-input-row mdui-checkbox mdui-disabled">
						<label>disabled checkbox</label>
						<input name="checkbox1" type="checkbox" disabled="disabled">
					</div>
				</form>
			</div>
		</div>
	</body>
	<script src="../../statics/mdui/js/mdui.min.js"></script>
	<script>
		mdui.init({
			swipeBack:true //启用右滑关闭功能
		});
		mdui('.mdui-input-group').on('change', 'input', function() {
			var value = this.checked?"true":"false";
			this.previousElementSibling.innerText = "checked："+value;
		});
	</script>
</html>